home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1994 November / Cd Ware (Nro. 2) - Epimundo.iso / DOS / UD / PSEDIT.ZIP / PSEDIT.DOC < prev    next >
Encoding:
Text File  |  1994-06-09  |  46.8 KB  |  1,015 lines

  1.                                     PSEDIT
  2.                               Binary File Editor
  3.                                  USER'S GUIDE
  4.  
  5.                   Copyright 1990, 1993 by Gary C. Crider and
  6.                                Parity Solutions
  7.                                
  8.  
  9.  
  10. TABLE OF CONTENTS:
  11.  
  12.         What is PSEDIT? .................................. 1.0
  13.         Customizing PSEDIT ............................... 2.0
  14.           The PSEDIT.INI Configuration File .............. 2.1
  15.           The PSEDIT= Environment Variable ............... 2.2
  16.           The PECOLOR= Environment Variable .............. 2.3
  17.           The PSEDIT Command Line and Switches ........... 2.4
  18.           Customizing On A Network ....................... 2.5
  19.         Operational Notes and Requirements................ 3.0
  20.         The Keyboard and Display ......................... 4.0
  21.         Modifying Data ................................... 5.0
  22.           Filling a block of data ........................ 5.1
  23.         Deleting Data .................................... 6.0  
  24.         Inserting Data ................................... 7.0  
  25.         Using the clipboard (Cut, Paste, Copy) ........... 8.0
  26.         Locating Data .................................... 9.0
  27.           Go to a Position in the File ................... 9.1
  28.           Search for Data ................................ 9.2
  29.         Print the File ................................... 10.0
  30.         Save the File .................................... 11.0
  31.         Hex/Decimal Conversions and Calculations.......... 12.0
  32.         Exiting PSEDIT ................................... 13.0
  33.         Help ............................................. 14.0
  34.         A Useful Example - 
  35.           Modification of DOS 5's EDIT ...................15.0
  36.         Installation ..................................... Appendix A
  37.         Disclaimer ....................................... Appendix B
  38.         Support .......................................... Appendix C
  39.         Registration ..................................... Appendix D
  40.  
  41.  
  42. 1.0 What Is PSEDIT?
  43.  
  44.    One thing most of us learned early while working on our first PC
  45. was that EDLIN, while useful, stank (stunk?)... was malodorous as an editor 
  46. of text files.  Soon there were hundreds of full screen text editors 
  47. available everywhere.  Even Microsoft finally came around and included EDIT 
  48. in DOS 5 to get us away from EDLIN.
  49.  
  50.    An early lesson that most who aspire to be power users learn is that not
  51. all changes we desire to make are in text files.  Sooner or later we end
  52. up patching an executable program, database, or strange format file that
  53. text editors will not handle.  Enter DEBUG.  Just as EDLIN was a pain for
  54. editing text files, DEBUG is a pain for editing binary files.  Strangely,
  55. few people have jumped out with binary editors and some of the few I have 
  56. seen are not much better than DEBUG.  
  57.  
  58.    PSEDIT is a very easy-to-use full screen editor for binary (or text) 
  59. files.  You simply type over the hex or ASCII data much as you would with
  60. any text editor.  PSEDIT ensures that you enter hex characters (0-9 and A-F)
  61. while you are in hex entry mode.  You will be able to see the hex and ASCII
  62. representations at all times whether you are editing in hex or ASCII.  
  63.  
  64.    Using PSEDIT is so intuitive, I don't know why I'm writing this documen-
  65. tation or why you are reading it.  Perhaps we both like to move cautiously.
  66.  
  67.    You see a full screen of data at all times, not just a few bytes.  Paging
  68. through the file is as easy as hitting PgUp and PgDn, you don't have to
  69. enter hex displacements to get to the next page.
  70.  
  71.    I think you'll find, as we have at a Fortune 100 company (my day job),
  72. that PSEDIT becomes one of the handiest tools you have.  You will use it
  73. much more than you now expect that you will.
  74.  
  75.    PSEDIT automatically detects and uses any available conventional, expanded
  76. or extended memory.  It will also use disk space to simulate memory when it
  77. runs short.  This shared memory pool is referred to as virtual memory.  It 
  78. allows very large files to be edited (up to 64 megabytes).
  79.  
  80.    PSEDIT was formerly distributed under the name BEDIT.
  81.  
  82.  
  83. 2.0 Customizing PSEDIT
  84.  
  85.    There are three ways to customize PSEDIT to fit your preferences and your
  86. environment.  The first and most recommended is to make your settings in
  87. the PSEDIT.INI file.  These become your default settings.  Sometimes you
  88. may want to override one or more of them temporarily.  The PSEDIT= and 
  89. PECOLOR= environment variables will override settings in the PSEDIT.INI
  90. file.  Finally the command line switches will override both the PSEDIT.INI
  91. file and the environment variables.  More options are configurable in the
  92. PSEDIT.INI file than with environment variables or command line switches.
  93.  
  94.  
  95. 2.1 The PSEDIT.INI Configuration File
  96.  
  97.    A sample PSEDIT.INI file comes with PSEDIT and is initialized to all of
  98. the defaults.  The defaults are used when the PSEDIT.INI file cannot be found
  99. or when a particular setting is missing from the file.  
  100.  
  101.    The PSEDIT.INI file can be changed with any text file editor and should be
  102. saved in a directory that is specified in DOS's PATH= environment variable,
  103. unless you use the PSEINI= environment variable.  You can use a SET statement 
  104. such as follows to tell PSEDIT where to look for the PSEDIT.INI file:
  105.  
  106.    SET PSEINI=D:\PSEDIT\
  107.  
  108.    Do not specify a file name, only the directory where PSEDIT.INI is
  109. located.  The trailing backslash is only required if you want to specify
  110. a root directory.  Place the SET statement in your AUTOEXEC.BAT file.
  111.  
  112.    If the PSEDIT.INI file is in a directory on your path, you do not need to
  113. use the PSEINI= environment variable.
  114.  
  115.    All of the settings and values for the PSEDIT.INI file are documented
  116. within the PSEDIT.INI file.  If you wish to add comments to the file,
  117. the first non-blank character on the line should be a semi-colon (;).
  118.  
  119.  
  120. 2.2 The SET PSEDIT= Environment Variable
  121.  
  122.  
  123.    This capability is for compatibility with versions of PSEDIT prior to 4.0,
  124. and is probably of little use to users of the PSEDIT.INI file.
  125.    
  126.    Some of the settings of the PSEDIT.INI file can be overridden with the
  127. PSEDIT= environment variable.  The following parameters are allowed in the 
  128. SET PSEDIT= command:
  129.  
  130.    MONO - Displays the screens in monochrome.  If you use a Monochrome
  131.           Display Adapter instead of a VGA adapter, you will need to
  132.           also specify BIOS.
  133.  
  134.    INTL - Allows display of the ASCII international character set (128-
  135.           168).  It also allows international characters to be input while
  136.           editing in ASCII mode and in ASCII search strings.
  137.  
  138.    GRPH - Allows display and entry of the ASCII international character set 
  139.           (128-168) plus graphics characters (169-254).  
  140.  
  141.    BIOS - Uses the ROM BIOS interrupts to write to the edit window.  This
  142.           allows use of MDA, CGA and other non-VGA adapters.  It may also
  143.           be required for some extended text modes, depending on the
  144.           video adapter being used.  Specify BIOS if you experience any
  145.           problems with the display of data in the edit window.
  146.  
  147.    To specify combinations of these parameters, separate them with commas.
  148. Example:
  149.  
  150.    SET PSEDIT=MONO,BIOS,INTL
  151.  
  152.    If you encounter an "Out of environment space" message, you can increase 
  153. your environment size by specifying a new amount in your CONFIG.SYS file with 
  154. the following statement:
  155.  
  156.    SHELL=c:\command.com /P /E:nnnn
  157.  
  158.    The nnnn should be replaced with the new environment space required.  512
  159. will give you quite a bit of space to work with.  If you use Microsoft 
  160. Windows 3.1, a value of 1024 or higher is recommended.
  161.    
  162.    For compatibility with BEDIT, the BEDIT= environment variable is also 
  163. accepted.
  164.  
  165.  
  166. 2.3 The PECOLOR= Environment variable
  167.  
  168.    This capability is for compatibility with versions of PSEDIT prior to 4.0,
  169. and is probably of little use to users of the PSEDIT.INI file.
  170.    
  171.    You can override the display colors specified in PSEDIT.INI.  Use the 
  172. PECOLOR environment variable to change any of the listed color options from 
  173. the default (or PSEDIT.INI value) to the color of your choice.  Place the 
  174. SET PECOLOR command in your AUTOEXEC.BAT if you want it to be in effect any 
  175. time you start PSEDIT.  The format is:
  176.  
  177.    SET PECOLOR=xnnn,xnnn,xnnn,...
  178.  
  179.    The x is one of the letters from the table below indicating which color
  180. options you want to change.  The number nnn is the attribute for the new
  181. color.  Determining the attribute value is discussed below.
  182.  
  183.    COLOR OPTION LETTERS
  184.  
  185.    A - Main editor colors.            Default = yellow on blue (30).
  186.    B - Data entry window color.       Default = white on magenta (95).
  187.    C - Data entry field color.        Default = white on blue (31).
  188.    D - Help window color.             Default = white on brown (111).
  189.    E - Status lines color.            Default = black on light gray (112).
  190.    F - Key id on status line color.   Default = red on light gray (116).
  191.    G - Active cursor color.           Default = light red on blue (28).
  192.    H - Inactive cursor color.         Default = light cyan on blue (27).
  193.    I - Drop shadow color.             Default = dark gray on black (8).
  194.    J - Pick list color.               Default = light gray on blue (23).
  195.    K - Pick list selection bar color. Default = white on red (79).
  196.    L - Blocked data color.            Default = black on light gray (112).
  197.    M - Active cursor in block.        Default = red on light gray (116).
  198.    N - Inactive cursor in block.      Default = magenta on light gray (117).
  199.  
  200.    The attribute is the sum of a background value plus a foreground value
  201. from the table below.  Add 128 if you want it to blink.
  202.  
  203.   Background colors:       Foreground colors:
  204.  
  205.     0 Black                 0 Black
  206.    16 Blue                  1 Blue
  207.    32 Green                 2 Green
  208.    48 Cyan                  3 Cyan
  209.    64 Red                   4 Red
  210.    80 Magenta               5 Magenta
  211.    96 Brown                 6 Brown
  212.   112 Light Gray            7 Light Gray
  213.                             8 Dark Gray
  214.                             9 Light Blue
  215.                            10 Light Green
  216.                            11 Light Cyan
  217.                            12 Light Red
  218.                            13 Light Magenta
  219.                            14 Yellow
  220.                            15 White
  221.  
  222.  
  223. 2.4 The PSEDIT Command Line and Switches
  224.  
  225.  
  226.    Format: PSEDIT [[path]filename] [/B] [/I] [/V /?] 
  227.  
  228.    The filename is the file name of the file that you want to edit.  PSEDIT 
  229. does not make an automatic backup, so back it up if you think there could    
  230. be problems.  You will be given a chance to change the file name before you
  231. save it.  The path is required if a file is specified and is not in the 
  232. current directory.  
  233.  
  234.    If no file name is specified, a pick list is displayed of all of the 
  235. files in the current directory.  To select a file, use the arrow keys to
  236. move the selection bar to the file you want, and press enter.  If a file is
  237. specified, but not found, a pick list will be displayed of all files in
  238. the specified directory.
  239.    
  240.    /? Display command line help prompt.
  241.    
  242.    /B reverses the effect of the MonochromeVideo setting in PSEDIT.INI or
  243.       the MONO parameter of the SET PSEDIT= command. If you have specified 
  244.       monochrome display, /B forces color display.  If you have not selected
  245.       monochrome, black and white (monochrome) display is forced.
  246.  
  247.    /I reverses the effect of the InternationalChars setting in PSEDIT.INI or
  248.       the INTL parameter of the SET PSEDIT= command.  If you have specified 
  249.       international characters, /I will cause international characters to
  250.       not be recognized.  If you have not specified international characters, 
  251.       /I forces recognition of international characters.
  252.  
  253.    /G reverses the effect of the GraphicsChars setting in PSEDIT.INI or the
  254.       GRPH parameter of the SET PSEDIT= command.  If you have specified 
  255.       graphics characters, /G will cause international and graphics 
  256.       charcters to not be recognized.  If you have not specified graphics
  257.       characters, /G forces recognition of international and graphics 
  258.       characters.
  259.  
  260.    /V reverses the effect of the BIOSWrites setting in PSEDIT.INI  or the
  261.       BIOS parameter of the SET PSEDIT= command.  If you have specified BIOS
  262.       writes, /V will force direct video memory reads and writes for the edit 
  263.       window.  If you have not specified BIOS writes, /V will force BIOS 
  264.       reads and writes.
  265.  
  266.  
  267.    Brackets ([]) indicate optional parameters.  Do not include the brackets
  268. in the command line.
  269.  
  270.  
  271. 2.5 Customizing On A Network
  272.  
  273.    In a LAN environment, PSEDIT would normally be installed on a file server
  274. in a directory that is on the search path.  The PSEDIT.INI file should also 
  275. be in this directory and will have the configuration for all users.  
  276.    
  277.    In order for an individual user to customize PSEDIT without impacting 
  278. others, use the PSEINI= environment variable to point to a local or private 
  279. directory that will contain the PSEDIT.INI file to be used.  The PSEINI=
  280. variable does not have to be specified if the personal PSEDIT.INI file is
  281. placed in a directory that precedes the directory with the master INI file
  282. in the search path.  
  283.    
  284.    The other environment variables (PSEDIT= and PECOLORS=) and command line 
  285. switches can also be used for individual customization.
  286.    
  287.  
  288. 3.0 Operational Notes and Requirements
  289.  
  290.    PSEDIT's only firm requirement is that it be run on an Intel-compatible
  291. system that is 286-equivalent or newer (386, 486, Pentium...).  The 8086/
  292. 8088 CPUs are no longer supported.
  293.    
  294.    See section 2.4, The PSEDIT Command Line and Switches, for instruction
  295. on how to start PSEDIT.
  296.  
  297.    It bears repeating at this point that PSEDIT DOES NOT MAKE AN AUTOMATIC
  298. BACKUP of the edited file.  Since much of the usefulness of PSEDIT is to just
  299. view or print the contents of a binary file, I did not want PSEDIT cluttering
  300. up my directories with backup files.  You can, however, change the name 
  301. at SAVE time.
  302.  
  303.    If you intend to modify a file with PSEDIT, I highly recommend making
  304. a backup file first or saving with a different name for obvious reasons.  
  305. Since PSEDIT will allow you to change any file in any way, it is obviously 
  306. a very dangerous weapon in the hands of the unskilled or careless as well 
  307. as a very powerful tool in the hands of the skilled and careful.  Please 
  308. be careful!
  309.  
  310.    PSEDIT reads the entire file into memory before any edits are performed.
  311. All changes are made only to the copy in memory until a SAVE is done. PSEDIT  
  312. uses VMM, a virtual memory manager by Parity Solutions.  VMM lets you utilize 
  313. as much conventional, expanded and extended memory as you have, then overflows 
  314. onto disk to simulate the remaining required memory.  Assuming you have 
  315. enough memory and disk space, you can edit files up to 64 megabytes in size.
  316.  
  317.    PSEDIT must have at least one byte in its data buffer to function,
  318. therefore, if you load a file with a length of 0, or delete all bytes in a
  319. file, one byte will show up on the screen and its value will be x00.
  320.  
  321.    PSEDIT has three different display modes and three different ways of 
  322. selecting the one you prefer.  The normal default mode is to display U.S. 
  323. English characters and punctuation.  The second adds international characters 
  324. and the third adds graphics characters.  If you wish to change the default, 
  325. use the PSEDIT.INI file or the SET command described in the "Customizing 
  326. PSEDIT" section.  If you want to change the initial mode for a single 
  327. execution of PSEDIT, use the command line switches /I or /G as described 
  328. under "Customizing PSEDIT."  If you want to change the characters displayed 
  329. after you have already loaded PSEDIT, use the ALT-I and ALT-G toggles as 
  330. described below under "The Keyboard and Display."
  331.  
  332.   The reason the U.S. English letters and punctuation were selected as the 
  333. default is first because most of the PSEDIT users are in the U.S., and
  334. second, because when most users refer to the ASCII portion, they are looking 
  335. for a particular text string or phrase.  Not displaying the graphics and
  336. international characters makes the phrase or word easier to spot.  If you
  337. know exactly what you are looking for, use the search feature to locate it
  338. quickly.  International users should not feel slighted, because you can 
  339. easily change the default to display international characters.  Unfortunately,
  340. you must display all international characters, not just the ones used in
  341. your language.
  342.  
  343.  
  344.  
  345. 4.0 The Keyboard and Display
  346.  
  347.    The top line of the display shows the name, size, date and time of the
  348. file being edited.  It also shows whether case-sensitivity is set on or off.  
  349. There is also an area that will toggle between "HEX" and "ASCII" depending on 
  350. which edit mode you are in.  The upper-right corner contains two numbers in
  351. the format ddddddd:xhhhhhh.  This is the current cursor location in both
  352. decimal (ddddddd) and hex (hhhhhh).  The bottom line contains a quick 
  353. reference of function keys and their usage.  Other key functions can be 
  354. displayed by pressing F1 (Help).
  355.  
  356.    Down the left side of the display is the offset from the start of the   
  357. file to the first byte displayed on that line.  The offset is in hex.   
  358.  
  359.   HINT: The easy way to see where your cursor is currently located is to
  360. press ALT-D or ALT-H, rather than adding the horizontal offset to the offset on the
  361. left of the screen.  The hex/decimal conversion windows will pop up with 
  362. the current cursor location displayed in the operand field.  ALT-D displays
  363. the offset in Decimal, ALT-H displays it in hex.
  364.  
  365.    There are two modes of editing in PSEDIT.  When you first load a file, the
  366. screen appears with both hex data and its ASCII representation displayed in 
  367. separate sections of the screen.  The cursor is initially placed in the hex 
  368. portion of the screen for editing in hex.  The character (represented by two 
  369. hex digits) at the cursor location appears red on color monitors.  The same 
  370. character on the ASCII (right) side will be light cyan.  All other data 
  371. characters are yellow.  As the cursor moves, you will see the light cyan 
  372. highlighting on the ASCII display move with the cursor and red letters of the 
  373. hex display.  Pressing TAB places the cursor in the ASCII portion and the 
  374. display at the cursor becomes red.  The corresponding position in the hex 
  375. data becomes light cyan.  TAB toggles the cursor back and forth between the 
  376. two editing areas.
  377.  
  378.    The ASCII display does not display every displayable character, but only
  379. letters and numbers and the more common punctuation symbols that are common
  380. to most printers.  All other characters appear as periods.  You can only 
  381. enter these characters on the ASCII side.  To enter exotic characters you 
  382. must use the hex representation on the hex side.  If a blank appears on the
  383. ASCII display, it is  because there is a true blank (hex 20) at that position.
  384.  
  385.    The following keys function as shown during editing:
  386.  
  387.    Page Down    - Display the next page of data.
  388.    Page Up      - Display the previous page of data.
  389.    Home         - Position the cursor at the start of the file.
  390.    End          - Position the cursor at the end of the file.
  391.    Down Arrow   - Move the cursor down one line.
  392.    Up Arrow     - Move the cursor up one line.
  393.    Right Arrow  - Move the cursor right one byte.  If at the end of a line, 
  394.                   move to the first byte of next line.
  395.    Left Arrow   - Move the cursor left one byte.  If at the start of a line,
  396.                   move to the last byte of the previous line.
  397.    Enter        - Same as right arrow.
  398.    Tab          - Swap the edit cursor between hex and ASCII modes.
  399.    Back Tab     - Clears the byte.  You must then type something in the byte
  400.                   before the cursor can be moved.
  401.    Insert       - Insert one byte.  Everything beyond this byte is shifted one 
  402.                   position and a hex 00 byte is inserted at the cursor.
  403.    Delete       - Delete one byte at the cursor.
  404.  
  405.    Function keys:
  406.  
  407.    F1     - Display the help screen.
  408.    F2     - Save any changes to the file on disk.
  409.    F3     - Insert a specified number of bytes at cursor.
  410.    F4     - Delete a specified number of bytes at cursor.
  411.    F5     - Move the cursor to a specified address within the file.
  412.    F6     - Print the file to LPT1:.  It appears in basically the same format
  413.             as displayed.
  414.    F7     - Toggle case-sensitivity for ASCII string searches.
  415.    F8     - Specify a search argument and locate the first occurrence of it in
  416.             the file.
  417.    F9     - Locate the next occurrence of the search argument.
  418.    F10    - Display status of clipboard, blocked data and the virtual
  419.             memory manager.
  420.    
  421.    
  422.    Alt keys:
  423.  
  424.    ALT-C  - Hex/decimal calculator 
  425.    ALT-D  - Decimal to hex conversion
  426.    ALT-H  - Hex to Decimal conversion
  427.    ALT-X  - Exit PSEDIT.
  428.    ALT-V  - Toggle between 25-line and 43/50 line display modes.
  429.    ALT-F6 - Print an address range.
  430.    ALT-I  - Toggle displaying of international characters.
  431.    ALT-G  - Toggle displaying of international and graphics characters.
  432.    
  433.    Block keys:
  434.  
  435.    CTL-K B - Mark the start of a block to be deleted.
  436.    CTL-K K - Mark the end of a block to be deleted.
  437.    CTL-K H - Unmark a currently marked block.
  438.    CTL-K F - Fill a block with a given value.
  439.  
  440.    Clipboard function keys:
  441.  
  442.    CTL-INS  - Copy blocked data to clipboard.
  443.    CTL-DEL  - Cut blocked data from the file and into the clipboard.
  444.    SHFT-INS - Paste clipboard contents at current cursor location.  The
  445.               contents are inserted.  Existing data is not overlaid.
  446.  
  447.    ESCAPE - Exit PSEDIT.
  448.  
  449.  
  450.  
  451. 5.0 Modifying Data
  452.  
  453.    Modifying data is very simple, just type over it.  Use the TAB key to 
  454. select the hex or ASCII area.  A MODE indicator on the top line will change 
  455. to indicate whether you are in hex or ASCII edit mode.  When typing in the 
  456. hex area, only valid hex characters, 0-9 and A-F are allowed and upper case 
  457. is forced.  When entering data in the ASCII portion, only common printable 
  458. characters are allowed and upper or lower case may be used.
  459.  
  460.  
  461. 5.1 Filling a block of data   
  462.  
  463.    You may mark a block of data (see Deleting Data below) and then press
  464. CTL-K F.  You will be prompted for a fill value (in HEX or ASCII depending 
  465. on your edit mode) to overlay the contents of the blocked data. You may press 
  466. ESCAPE at the prompt to abort the fill operation.  Once you enter the value 
  467. and press enter, the blocked area is filled with the value you specified.
  468.  
  469.  
  470. 6.0 Deleting Data
  471.  
  472.    First place the cursor on the first byte of the data that you want to 
  473. delete.  Pressing the DELETE key deletes one byte of data at this position.
  474. Press DELETE repeatedly to delete several bytes.  If a large block needs to
  475. be deleted, press the F4 key and reply to the prompt with the number of bytes 
  476. (up to the clipboard size as specified in PSEDIT.INI) you want to delete 
  477. starting with the byte at the cursor.
  478.  
  479.    There is also a facility to mark a block and then delete it.  Press 
  480. CTL-K B to mark the first byte of a block, then press CTL-K K to mark the
  481. last byte of a block.  Then press DELETE or F4 to delete the block.  You
  482. can unmark a block by pressing CTL-K H.  You can also change the start or 
  483. end of the block at any time before the block is deleted or unmarked.  These 
  484. keys conform to WordStar-type conventions used in many text editors and word 
  485. processors today.  You can mark and delete blocks up to the size of the
  486. clipboard as specified in PSEDIT.INI.
  487.  
  488.    PSEDIT cannot handle a file with no data.  If you delete all bytes in the
  489. file, PSEDIT will display a file with one byte of x00.
  490.  
  491.  
  492. 7.0 Inserting Data
  493.  
  494.    PSEDIT, rather than using an insert mode, lets you insert bytes of binary 
  495. zeros, hex 00, into the file.  You can then type over the inserted bytes with 
  496. the data that you require, or you can use the fill function to fill the area
  497. with another value.
  498.  
  499.    Inserting data causes the file to grow.  To allow for this growth, an
  500. additional 64k of virtual memory was acquired.  Thus, if you insert more than
  501. 64 kilobytes, you must save the file and reload it to acquire another 64k
  502. expansion area.  The size of the expansion area can be increased as high
  503. as 256k in the PSEDIT.INI file.
  504.  
  505.    Place the cursor at the byte where you want the data inserted.  The data
  506. is inserted BEFORE the byte at the cursor.  Pressing the INSERT key inserts 
  507. one byte at a time.  If a large block needs to be inserted, press F3 and 
  508. specify the number of bytes you want inserted up to the size of the clipboard
  509. as specified in PSEDIT.INI.  Once the null bytes appear, type over them if 
  510. necessary.
  511.  
  512.    In order to add bytes to the end of the file, press END to go to the last
  513. byte of the file then press the right arrow.  Each press of the right arrow
  514. adds a byte to the file.  To enter a large block at the end of the file,
  515. press the right arrow once, then press F3 and specify the number of bytes
  516. needed less one (since you already added one when you pressed the right
  517. arrow).
  518.  
  519.    You can insert data from the clipboard by placing the cursor where you
  520. want the inserted data to begin and pressing SHIFT-INSERT.  If the clipboard
  521. is empty, nothing will happen.  Otherwise, the new data will appear inserted
  522. at the cursor location and marked as a block.  This is so that if you made a
  523. mistake and placed it improperly, you can just press DELETE to delete it,
  524. reposition your cursor and hit SHIFT-INSERT again to reinsert it.  Press
  525. CTL-K H to unmark the block.  The data remains in the clipboard, so it can 
  526. be inserted at multiple locations.
  527.  
  528.  
  529.  
  530. 8.0 Using the Clipboard (Cut, Paste, Copy)
  531.  
  532.    PSEDIT contains a clipboard for use in cutting, pasting and copying
  533. marked blocks. It's size may range from 0 to 48k and is specified in 
  534. PSEDIT.INI.  The clipboard uses CUA keyboard conventions.
  535.  
  536.    First, mark a block of data (see Deleting Data for instructions on
  537. marking blocks), then press CTRL-INSERT to copy the block to the clipboard.
  538. Press SHIFT-DELETE if you want to copy the block to the clipboard and 
  539. delete it from its current position in the file (Cut).
  540.  
  541.    Once you have cut or copied data into the clipboard, you may paste 
  542. (insert) it anywhere in the file by using SHIFT-INSERT.  See Inserting Data
  543. for details on using the paste feature.
  544.  
  545.    If you try to cut or copy a block that is greater than the clipboard size,
  546. a message window will pop up and the current block marks must be adjusted
  547. to select a smaller block.
  548.  
  549.  
  550.  
  551. 9.0 Locating Data
  552.  
  553.    There are basically three ways to move the cursor to an area you want
  554. to edit.
  555.  
  556.    First you can use Page Down and Page Up to visually look for that area you
  557. want.  Primitive, but effective.
  558.  
  559.    Second, if you know the offset into the program of the area you want to 
  560. modify, press F5 and type the offset in hex.  
  561.  
  562.    The third method is to let the computer search for a known byte config-
  563. uration.
  564.  
  565.  
  566.  
  567. 9.1 Go to a Position in the File
  568.  
  569.    An offset or displacement is measured from the start of the file.  The
  570. first byte is offset 0, the second is 1, etc.  When you press F5, you are
  571. prompted for an offset which you provide in hex.  The cursor is then placed 
  572. at that address and display is updated to show the data at the cursor.
  573.  
  574.    This method is often used in applying documented patches supplied by a 
  575. software vendor.
  576.  
  577.  
  578.  
  579. 9.2 Search for Data
  580.  
  581.    Pressing F8 pops up a dialogue box that requests entry of a search argument.
  582. After supplying this argument, the cursor is positioned to the first 
  583. occurrence of that value in the file.  If it is not found, the cursor will 
  584. appear on the last byte of the file.  If a first occurrence is found, pressing
  585. F9 searches for the next occurrence.  If a second is found, pressing F9 again
  586. searches for the third occurrence, and so on.
  587.  
  588.    If the cursor is in the hex editing area, you will be prompted for up to
  589. 30 hex bytes of search argument (60 hex digits).  When the cursor is in
  590. the ASCII editing area, you may enter up to 60 ASCII characters for a search
  591. argument.  Admittedly the search arguments are small, but I have found that
  592. when editing binary files, you are generally not looking for long strings.
  593.  
  594.    Hex data is normally entered in sets of two hex digits (nibbles) since it
  595. takes two hex digits to represent one byte.  If you enter an odd number of hex 
  596. digits, a zero nibble is prepended to the argument.  For example, if you
  597. enter 18A, the resulting two bytes that are located are 01 8A.  
  598.  
  599.   No byte swapping is ever done to accommodate the PC's low-high storage 
  600. scheme of integer data.  So if you are looking for an integer value of 
  601. 1000 (decimal), hex 3E8, which is stored as hex E8 03, the search argument 
  602. you would provide is E803.  If you don't have a clue what this means, you 
  603. probably don't need to be concerned about using PSEDIT in this manner.
  604.  
  605.   The F7 key is used to enable or disable case-sensitive searches when in
  606. ASCII character mode.  The current state is shown on the top line of the 
  607. display.  If ON, upper/lower case letters must match exactly.  If OFF,
  608. upper and lower case letters are equivalent.  The CASE mode has no effect
  609. on hex mode searches.
  610.  
  611.  
  612.  
  613. 10.0 Print the File
  614.  
  615.    Printing the file is easy.  You just press F6 and a window will pop up
  616. that tells you how many pages will be printed.  You may abort at this time
  617. by pressing ESCAPE or replying N to the "Continue? (Y/N)" prompt.  As pages
  618. are sent to the printer, the page number will be displayed.  You may press
  619. any key to cancel printing at the end of the current page.
  620.  
  621.    The output is sent to standard print (PRN).  The format is side-by-side 
  622. hex/ASCII like that displayed on the screen with offset addresses (dis-
  623. placements) at the start of each line.  880 (hex 370) bytes are printed on 
  624. each page.  The pages are numbered and the file name, size, date and time 
  625. appear at the beginning of each page.
  626.  
  627.    ALT-F6 allows you to supply a starting and ending address range to print.  
  628. The actual pages printed will probably not start and end with the addresses 
  629. you provided.  Rather the pages (as if you had printed the entire file) that 
  630. contain your starting address through your ending address will be the only
  631. pages printed.
  632.  
  633.    
  634.  
  635. 11.0 Saving the File
  636.  
  637.    Prior to pressing F2 to save the file, all modifications are only done in 
  638. virtual memory.  F2 writes the file image in memory over the file that was 
  639. originally loaded, and the changes become permanent.
  640.  
  641.    You may, however, change the file name at save time.  A dialogue box will
  642. appear with the current file name.  Accept it as is by pressing ENTER or
  643. modify it first.
  644.  
  645.    If the saved file name already exists you will be asked for verification
  646. before overwriting.
  647.  
  648.  
  649. 12.0 Hex/Decimal Conversions and Calculations
  650.  
  651.    Pressing ALT-D (Decimal-to-hex) pops up a window into which up to eight-
  652. digit decimal numbers can be entered.  Pressing ENTER displays the results 
  653. of converting this number to hexadecimal.  Pressing ESC exits the window.
  654. Initially, the current cursor position is displayed in the operand field.
  655.  
  656.    Pressing ALT-H (Hex-to-Decimal) pops up a window into which up to eight-
  657. digit hexadecimal numbers can be entered.  Pressing ENTER displays the 
  658. results of converting this number to decimal.  Pressing ESC exits the window.
  659. Initially, the current cursor position is displayed in the operand field.
  660.  
  661.    ALT-C pops up a hex/decimal calculator which will add, subtract, multiply 
  662. or divide two hex, decimal or mixed values.  The result is displayed in both\
  663. hex and decimal.  When entering the values to be calculated, precede hex 
  664. values with an X (i.e. X31A0) and preceed decimal values with a D (i.e. 
  665. D4095).  Enter a plus (+) or minus (-) sign in the operator field.  Press 
  666. CTRL-ENTER when ready to calculate (or ENTER at the operator field).
  667.  
  668.    Since it is designed primarily to help you figure displacements within a
  669. program, the calculator operates on unsigned long (4-byte) integer values.
  670. Thus decimal points and negative numbers are not allowed.  If you subtract a 
  671. number from a smaller number, the result will be the 32-bit two's compliment
  672. of the negative result, usually a very high number.  For instance, if you 
  673. subtract 1 from 0, the result will be 4,294,967,295, the maximum for an
  674. unsigned long integer.  If you compute a number with results higher than
  675. the above number, the results will be inaccurate.  Let's hope you are not
  676. trying to edit any 4 Gb files!
  677.  
  678.   When you first invoke the calculator, the hex displacement of the current
  679. cursor location will be in the first operand.  This facilitates calculating
  680. displacements forward or backward from the cursor.  You can change the value
  681. to anything you like.
  682.  
  683.   HINT: The easy way to see where your cursor is currently located is to
  684. press ALT-D or ALT-H, rather than adding the horizontal offset to the offset 
  685. on the left of the screen.  The hex/decimal conversion windows will pop up 
  686. with the current cursor location displayed in the operand field.  ALT-D 
  687. displays the offset in Decimal, ALT-H displays it in hex.
  688.  
  689.  
  690. 13.0 Exiting PSEDIT
  691.  
  692.    To quit PSEDIT, press ESC from the main edit screen.  You will see a 
  693. prompt: "Exit Editor? (Y/N)".  Any response other than Y or y will return you 
  694. to the point you were when you pressed ESC.  A Y response returns you to DOS 
  695. or to the file name pick list if the editor was entered via the pick list.  To 
  696. exit from the pick list screen to DOS, press ESC.  Once you exit to DOS or the 
  697. pick list, any unsaved modifications in the editor are lost.
  698.  
  699.    If you wish to exit PSEDIT without having to reply to the prompt, press
  700. ALT-X for a quick exit.  Any modifications since the last save are lost.  It
  701. also bypasses a return to the file pick list when entry to the editor was via
  702. the pick list.
  703.  
  704.  
  705. 14.0 Help
  706.  
  707.    Pressing F1 pops up a help screen describing the editing and function keys.
  708. Pressing ESCAPE (or any key when last page is displayed) removes the help
  709. window and returns you to the editor.  Page Down and Page Up can be used to 
  710. move between help pages.
  711.  
  712.  
  713.  
  714. 15.0 A Useful Example - Modification of DOS 5's EDIT
  715.  
  716.    I prefer DOS 5's EDIT command by leaps and bounds over the EDLIN of
  717. previous DOSes, but there is one thing I especially don't like about it.
  718. When you select File/Open, it comes up with a default file list specification
  719. of *.TXT, like that is the only extension ever used for ASCII text files.  I
  720. would prefer *.* and let me choose from all of my files.  After reviewing
  721. all of the options, it appeared to me that there was no way to set this
  722. value to *.*.
  723.  
  724.    My next thought is that since there doesn't appear to be any type of
  725. configuration file for EDIT, the *.TXT string must be in the program, so
  726. I'll just pull out my trusty PSEDIT and zap it to *.*.  Let's do it.
  727.  
  728.    Go to your directory where you keep DOS (usually C:\DOS).  Type PSEDIT
  729. EDIT.COM.  Since we know we are looking for an ASCII string of *.TXT, press
  730. TAB to swap the cursor to the ASCII area and press F8 to search.  Enter
  731. *.TXT and press ENTER.  You now find that your cursor is positioned on the 
  732. last byte of the file.  This means it didn't find the string we were
  733. looking for.  Strange.
  734.  
  735.    But look! Right above our cursor are some messages that EDIT.COM displays.
  736. One of them reads, "Can not find file QBASIC.EXE."  Oh yeah, I read somewhere
  737. that the EDIT editor with DOS 5 was a version of the QBASIC editor.  Let's
  738. press ESCAPE, answer 'Y' and get back to the DOS prompt.  Now let's enter
  739. PSEDIT QBASIC.EXE.
  740.  
  741.    Again let's go the ASCII area with TAB and search for *.TXT with F8.  
  742. Bingo! We found it.  
  743.    
  744.    In my copy of DOS 5.0's QBASIC.EXE, I am now at a displacement of hex 
  745. 3BCCA into the program and the cursor is positioned on the * of string *.TXT.  
  746. Hit the right arrow twice to position the cursor on the first T.  Type an 
  747. asterisk (*).  The string now shows *.*XT and the cursor is on the X.
  748. Lets change the X and T to hex 00s, which in most languages is used to 
  749. terminate a string.  Since we can't enter a binary zero field in the ASCII
  750. area, press TAB to switch the cursor back to the hex area.  Now type
  751. four 0s.  As you can see you have now changed the XT characters from
  752. hex 54 58 (the hex representation of X and T) to hex 00 00.
  753.  
  754.    This is what we wanted to do, so now let's save the file by pressing
  755. F2.  Since the file was not backed up beforehand, type in a new file name
  756. (QBASIC.1) just to make sure it works before we destroy the original. Exit 
  757. to DOS by pressing ESCAPE and Y.  Rename the original to QBASIC.BAK and 
  758. QBASIC.1 to QBASIC.EXE.  Now type EDIT and go to the File/Open screen.  Lo 
  759. and behold!  It now reads *.* and all of the files in the current directory 
  760. are displayed in the pick list.
  761.  
  762.    You can go delete QBASIC.BAK now.
  763.  
  764.  
  765.  
  766. APPENDIX A
  767.  
  768. Installation
  769.  
  770.     PSEDIT is distributed in a self-extracting ZIP file called PSEDT.EXE.  It 
  771. contains the following files:
  772.  
  773.         PSEDIT.EXE         The executable file for PSEDIT.
  774.         PSEDIT.INI         Configuration file for PSEDIT.
  775.         PSEDIT.DOC         The documentation file.
  776.         PSEDIT.HST         Modification descriptions for previous versions
  777.                            of PSEDIT. 
  778.         PSEDIT.Vnn         Modification descriptions for current version nn.
  779.         PRODUCTS.DOC       A description of other Parity Solutions products
  780.                            available on CompuServe and ZiffNet.
  781.  
  782.     For best results, extract the file into a directory on your PATH.  If you
  783. don't use a directory in your path, you will have to designate the directory
  784. containing PSEDIT.EXE when executing the program.
  785.  
  786.     If you have a utility directory that is on your PATH, this is an excellent
  787. location for PSEDIT.  An example installation would be:
  788.  
  789.     C:
  790.     CD \UTIL
  791.     copy [path]PSEDT.EXE
  792.     PSEDT
  793.     DEL PSEDT.EXE
  794.  
  795.     If they are not currently in your path, simply copy all of the files to a
  796. directory in your path.  Keep the PSEDT.EXE file anywhere you like, but give 
  797. plenty of copies, as is, to your friends.  If you register PSEDIT, you are not 
  798. licensed to give your serial number to anybody without first removing the 
  799. serialization from your copy.
  800.  
  801.  
  802.  
  803.  
  804. APPENDIX B
  805.  
  806.  
  807. Disclaimer
  808.  
  809. BECAUSE OF THE DIVERSE NATURE OF COMPUTER EQUIPMENT AND EXPERTISE OF USERS,
  810. PARITY SOLUTIONS AND GARY C. CRIDER MAKE NO WARRANTY ON THE PSEDIT PROGRAM
  811. WHATSOEVER, EXPRESS OR IMPLIED.  THE USER ASSUMES ALL RISK OF DAMAGE TO DATA 
  812. OR EQUIPMENT RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OR MISUSE OF THIS 
  813. PROGRAM PRODUCT.  THE USER MUST BE AWARE THAT USING PSEDIT TO MAKE ALTERATIONS 
  814. TO PROGRAMS OR DATA CAN RENDER THAT PROGRAM OR DATA USELESS.
  815.  
  816. USERS ARE ADVISED TO TEST MODIFICATIONS MADE WITH PSEDIT THOROUGHLY ON FILES 
  817. FOR WHICH A BACKUP EXITS.  ANY LIABILITY OF THE AUTHOR OR PARITY SOLUTIONS IS 
  818. LIMITED TO REPLACEMENT OR REFUND OF THE REGISTRATION FEE.
  819.  
  820.  
  821.  
  822.  
  823. APPENDIX C
  824.  
  825.  
  826. Support
  827.  
  828.     I have tried to test the program to the fullest, but I am limited as to
  829. systems and configurations with which to test.  I have been programming for 18
  830. years and the one thing I know for sure is that bug free programs are very few
  831. and far between.  I can only promise to support the program to the best of my
  832. ability and provide fixes as expeditiously as possible.  PSEDIT has been used
  833. at my home and work site extensively for several years and has proven to be a
  834. reliable tool.
  835.  
  836.     Anyone can report problems and suggest changes.  Registered users get top
  837. priority in resolving their problems.  There are three ways you can report
  838. problems.  The preferred method is to contact me through CIS mail (not forum
  839. messages).  My CIS ID is 71760,3413.  You can also write me at:
  840.  
  841.    Gary C. Crider
  842.    Parity Solutions
  843.    1903 Pavia Court
  844.    Arlington, TX 76006
  845.  
  846.     The last method is to phone (817) 261-9552.  Since I am the sole technical
  847. support and the line is also used for my network consulting business, it is
  848. often hard to get through to me.  Please call and leave a message between 7:30
  849. am and 5:30 pm Central time.
  850.  
  851.     No matter which method you use, please give a brief description of your
  852. problem, the release number of your program, your registration serial number 
  853. if you are registered, and your phone number.  If I need more information, I 
  854. will contact you as soon as I can.  When I have a solution, I will contact 
  855. you however you prefer.
  856.  
  857.     I work full time, have a consulting business to run in my spare time and
  858. write programs instead of sleeping.  So please be a little patient with me.
  859.  
  860.     Program updates are available on CompuServe or can be requested from us
  861. for a $5 shipping and handling charge.  Add $1 for international shipping
  862. outside the U.S., Canada and Mexico.  A distribution disk of all Parity 
  863. Solutions products will be sent to you.  Specify disk size and format.
  864.  
  865.  
  866.  
  867. APPENDIX D
  868.  
  869.  
  870. Registration
  871.  
  872.  
  873.     I begin with an apology.  I hate programs that in any way inhibit func-
  874. tionality or performance for the shareware version.  But when it came down to
  875. feeding the family and paying the bills, I had a change of heart and inserted
  876. a pesky notice that pops up at the beginning and gets on your nerves.  I
  877. chose this approach above that of limited functionality.  The program's full
  878. capabilities are available for you to evaluate before you invest your hard-
  879. earned money.
  880.  
  881.     Registered users will receive a unique serial number and instructions on
  882. how to serialize the program.  Serialization can be re-applied to updated
  883. versions and in no way hinders your use of the program.  You can compress or
  884. decompress the program with no effect.  It is already compressed before 
  885. distribution.
  886.  
  887.     As a registered user, you will be able to update without re-registration
  888. or additional fees.
  889.  
  890.     To register your copy, please send $24 US ($95 per file server on LANs) 
  891. check or money order (sorry, no credit cards yet) to:
  892.  
  893.    Gary C. Crider
  894.    Parity Solutions
  895.    1903 Pavia Court
  896.    Arlington, TX 76006
  897.  
  898.     Purchase orders for amounts of $72 or more are accepted from U.S. or
  899. Canadian companies and institutions.
  900.  
  901.     Add $1 to total order for postage outside the U.S., Canada and Mexico.
  902.     
  903.     Or, you can register single-use licenses online quickly and easily in 
  904. Compuserve.  Simply GO SWREG and register ID #751.  Your registration will be 
  905. added to your Compuserve bill.  International exchange was never easier, and
  906. you save the $1 postage charge.
  907.  
  908.     If you send your CIS ID or register via SWREG, your registration will be 
  909. sent to you via CIS mail, along with instructions on how to serialize your copy 
  910. of PSEDIT.  This usually involves one day or less turnaround.
  911.  
  912.     Program diskettes are not normally shipped.  Normal distribution is via 
  913. CompuServe.  If you need a diskette, please see the instructions under Support 
  914. above.  You will receive a serial number and instructions for serializing your 
  915. copy of the program.
  916.     
  917.     Each license gives you or your company a single use permit for PSEDIT. It 
  918. is not restricted to a single machine as long as no two users can be simul-
  919. taneously using the program.  As Borland says, "treat it like a book."  As an 
  920. example, if you register PSEDIT for your home computer, but during the day you 
  921. use a portable or a computer at work,  you may keep PSEDIT on both machines as 
  922. long as no one is at home using it on your home computer.
  923.  
  924.     LAN licenses grant rights to all users of a file server.  If inter-
  925. networking, a license must exist for each file server that contains a copy
  926. of PSEDIT.EXE.  If two or more file servers exist on a single LAN strictly for
  927. mirroring data and fault-tolerance, these will be counted as a single file
  928. server for licensing purposes.  If in doubt, contact me.  We can work out
  929. an agreement.
  930.  
  931.     Site licensing is also available on a negotiated price basis.  I guarantee
  932. it will be an economical alternative to buying licenses for each user.
  933.  
  934.     You may freely distribute the original PSEDT.EXE file in any way you see
  935. fit other than selling it.  Users' groups and shareware distribution services
  936. may charge a reasonable fee for the medium and duplication costs.  Bulletin 
  937. boards may not charge additional fees for downloading this specific program, 
  938. other than normal connect-time and/or membership charges.
  939.  
  940.     You are NOT licensed to give anyone your serial number unless you first
  941. remove all serialization from your computer.  You may then no longer use that
  942. serial number.  Only Parity Solutions has the authority to issue serial
  943. numbers.
  944.  
  945.     Modification of PSEDIT.EXE in any way is prohibited and unlawful.
  946.     
  947.     Licensees of Parity Solutions' BEDIT program may serialize PSEDIT by
  948. renaming BEDIT.SER to PSEDIT.SER.
  949.  
  950. ==============================================================================
  951.                 
  952.                           ORDER FORM FOR PSEDIT
  953.  
  954. Send checks payable to:
  955.  
  956.   Parity Solutions                
  957.   1903 Pavia Court
  958.   Arlington, TX 76006
  959.  
  960.  
  961.  
  962. BILLING ADDRESS:                        SHIP TO (If different):
  963.  
  964. NAME:    _____________________________  NAME:      ___________________________
  965.       
  966. COMPANY: _____________________________  COMPANY: _____________________________
  967.  
  968. STREET:  _____________________________  STREET:  _____________________________
  969.  
  970.          _____________________________           _____________________________ 
  971.         
  972. CITY/ST: _____________________________  CITY/ST: _____________________________
  973.  
  974. ZIP/POSTAL CODE: _____________________  ZIP/POSTAL CODE: _____________________
  975.  
  976. COUNTRY: _____________________________  COUNTRY: _____________________________
  977.  
  978. PHONE:   _____________________________  PHONE:   _____________________________
  979.  
  980.  
  981. CompuServe ID: _______________________(Optional)
  982.  
  983.  
  984.    NOTE: Parity Solutions sends a serial number for each registration and 
  985.          instructions for serializing your program.  A diskette containing
  986.          the latest releases of all Parity Solutions shareware products is
  987.          available for $5.00 U.S.  The current release of PSEDIT is avail- 
  988.          able for downloading on CompuServe in the IBMSYS forum.
  989.  
  990.  
  991.    QTY   DESCRIPTION                             PRICE EA.   TOTAL PRICE
  992.  
  993.    ___   PSEDIT license and registration           $24.00    ___________
  994.  
  995.    ___   PSEDIT Network license and registration    95.00    ___________
  996.  
  997.    ___   Parity Solutions shareware diskette         5.00    ___________
  998.  
  999.          International postage outside U.S.,         1.00    ___________
  1000.          Canada and Mexico.                
  1001.  
  1002.                              
  1003.                                           Total Enclosed:    ___________
  1004.  
  1005.  
  1006. Diskette size (if ordered): __ 5.25" 360k  __ 5.25" 1.2M  __ 3.5" 760k
  1007.  
  1008.  
  1009. Thank you for doing business with Parity Solutions.  (817) 261-9552
  1010.  
  1011. Parity Solutions is a partnership of Gary C. Crider and Russell L. McCloud.  
  1012. Federal tax identification number 75-2468376.
  1013. ==============================================================================
  1014.  
  1015.